package com.ds.infrastructure.hyperspace.console.model.response.container;

import com.ds.infrastructure.hyperspace.console.entity.table.TbContainerConfig;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author: yaozhendong
 * @create: 2019-10-18 11:43
 **/
@Data
@NoArgsConstructor
public class ListContainerVO {

    private Long id;

    private Integer configVersion;

    private Date gmtModified;
    private String description;

    public static ListContainerVO toVO(TbContainerConfig entity) {
        ListContainerVO listContainerVO = new ListContainerVO();
        listContainerVO.setId(entity.getId());
        listContainerVO.setConfigVersion(entity.getConfigVersion());
        listContainerVO.setDescription(entity.getDescription());
        listContainerVO.setGmtModified(entity.getGmtModified());
        return listContainerVO;
    }
}
